package pokerantani.v2.linematchers;

import java.util.List;
import java.util.regex.Pattern;

import pokerantani.v2.LineMatcher;
import pokerantani.v2.RE;
import pokerantani.v2.model.Card;


public class ActShowdown extends LineMatcher {
	static final Pattern pActShowdown = Pattern.compile("(" + RE.PLAYER + "):? shows \\[(" + RE.CARD + ") (" + RE.CARD + ")\\] (.*)");

	public String playerName;
	public List<Card> cards;
	
	public boolean match(String line) {
		if(match(line, pActShowdown)) {
			playerName = group(1);
			cards = groupCards(2, 3);
			return true;
		}
		return false;
	}
}
